﻿package com.javaPattern.Decorator;

public class TestDecorate {
	public static void main(String args[]) {
		new Decorate(new ChinaHello(new Hello())).sayHello();
		System.out.println();

		Component deImpl = new Hello();
		Decorate sim1 = new HelloWorld(deImpl);
		sim1.sayHello();
		System.out.println();

		Decorate sim2 = new ChinaHello(new HelloWorld(new Hello()));
		sim2.sayHello();

	}

}
